package com.yugao.fintech.vctgone.admin.converter;

import com.yugao.fintech.vctgone.admin.pojo.dto.UserDTO;
import com.yugao.fintech.vctgone.admin.pojo.dto.UserImportDTO;
import com.yugao.fintech.vctgone.admin.pojo.po.SysUser;
import com.yugao.fintech.vctgone.admin.pojo.vo.UserInfoVO;
import org.mapstruct.Mapper;

@Mapper(componentModel = "spring")
public interface UserConverter {
    /**
     * UserDTO -> SysUser
     * @param dto UserDTO
     * @return SysUser
     */
    SysUser userDtoToSysUser(UserDTO dto);

    /**
     * UserImportDTO.FileItem -> SysUser
     * @param fileItem UserImportDTO.FileItem
     * @return SysUser
     */
    SysUser fileItemToSysUser(UserImportDTO.FileItem fileItem);

    /**
     * SysUser -> UserInfoVO.UserInfo
     * @param user SysUser
     * @return UserInfoVO.UserInfo
     */
    UserInfoVO.UserInfo sysUserToUserInfo(SysUser user);
}
